#ifndef RESULT_H_INCLUDED
#define RESULT_H_INCLUDED
#include "wine.h"

/**
 * @brief The Result struct
 *
 * Data structure for storing all relevant information about prediction task
 *
 */
struct Result{
    Result(std::vector<int> s){settings = s;}
    Result(){
    std::vector<int> settings(7,0);
    std::vector<int> correct_pre(7,0);
    std::vector<int> total_pre(7,0);
    std::vector<int> real_results(7,0);
    std::vector<int> correct_types(2,0);
    std::vector<int> total_types(2,0);
    std::vector<int> total_pred_types(2,0);
    }
    std::vector<int> correct_types;
    std::vector<int> total_types;
    std::vector<int> settings;
    std::vector<int> correct_pre;
    std::vector<int> total_pre;
    std::vector<int> real_results;
    std::vector<int> total_pred_types;
    std::vector<std::vector<Wine*> > pre_wines;
    bool operator<=(const Result & l_result) const {
        return l_result.correct_ones() >= correct_ones();
    }
    bool operator==(const Result & l_result) const {
        return l_result.correct_ones() == correct_ones();
    }
    bool operator<(const Result & l_result){
        return l_result.correct_ones() > correct_ones();
    }
    bool operator<(const Result & l_result){
        return l_result.correct_ones() > correct_ones();
    }
    double correct_ones() const{
        double sum1 = 0;
        for(auto& i : correct_pre)
            sum1 += i;
        return sum1;
    }
};


#endif // RESULT_H_INCLUDED
